package com.fafi.selfmvc.vo;

import com.alibaba.fastjson.JSON;

public class MyBean {
	private int age;
	private String name;

	public MyBean() {}

	public MyBean(String age, String name) {
		this.age = Integer.valueOf(age);
		this.name = name;
	}

	public MyBean(String json) {
		MyBean bean = JSON.parseObject(json, MyBean.class);
		this.name = bean.name;
		this.age = bean.age;
	}

	public MyBean(int age, String name) {
		this.age = age;
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return "MyBean{" +
				"age=" + age +
				", name='" + name + '\'' +
				'}';
	}
}
